hiddenSymmetries / virtual-casing

4 stars 7 forks source link

change set(CMAKE_CXX_FLAGS ...) in CMakelists. #8

Closed smiet closed 1 year ago

smiet commented 1 year ago

Resolve compilation failure where FFTW include files are not found.

Cause: CMake adds path to${CONDA_PREFIX}/include, then overwrites CMAKE_CXX_FLAGS, and doesn't add FFTW_INCLUDE_DIRS because they are identical to ${CONDA_PREFIX}/include.

Probably only occurs on systems using conda and where fftw3 is installed through conda and not on standard system paths.

fixed by changing lines in CMakelists.txt from: set(CMAKE_CXX_FLAGS "-O3 -march=native -mfma -ffp-contract=fast") to set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -march=native -mfma -ffp-contract=fast")

to retain originally set flags.