-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
A student posted this on Piazza. Maintainers, please take a look :D
This might be done on purpose, but it did take me quite some time to figure out what is going on.
In the CmakeLists.txt that lives in ddg-exercises/projects/simplicial-complex-operators/CMakeLists.txt, line 41 (pasted below), the flag -DNDEBUG is passed. This disables the Eigen shape-checking for matrix multiplication. This allows wrongly shaped matrices to be multiplied silently. Once I took out this flag debugging became much easier :).
# https://gitlab.kitware.com/cmake/cmake/-/issues/22484
include(CheckCXXCompilerFlag)
unset(COMPILER_SUPPORTS_MARCH_NATIVE CACHE)
CHECK_CXX_COMPILER_FLAG(-march=native COMPILER_SUPPORTS_MARCH_NATIVE)
if(COMPILER_SUPPORTS_MARCH_NATIVE)
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG")
else()
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -mcpu=apple-m1 -DNDEBUG") # Apple M1
endif()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels