CoreNeuron icon indicating copy to clipboard operation
CoreNeuron copied to clipboard

Respect CMAKE_EXE_LINKER_FLAGS/CMAKE_SHARED_LINKER_FLAGS flags set via CLI

Open pramodk opened this issue 3 years ago • 2 comments

Description

In the case of Clang, we were always overriding the above-mentioned flags and hence cmake args were ignored (resulting in link errors)

How to test this?

On BB5 with Clang compiler

module load unstable gcc llvm hpe-mpi cmake python-dev flex bison
cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/install -DCORENRN_ENABLE_GPU=OFF -DCORENRN_ENABLE_NMODL=OFF -DCORENRN_ENABLE_MPI=ON  -DNRN_ENABLE_CORENEURON=ON -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_TESTS=OFF '-DCMAKE_EXE_LINKER_FLAGS=-L/gpfs/bbp.cscs.ch/home/kumbhar/spack_install/software/install_gcc-11.2.0-skylake/intel-oneapi-mkl-2021.4.0-gbepe3/compiler/2021.4.0/linux/compiler/lib/intel64_lin -lsvml -lintlc -Wl,-rpath,/gpfs/bbp.cscs.ch/home/kumbhar/spack_install/software/install_gcc-11.2.0-skylake/intel-oneapi-mkl-2021.4.0-gbepe3/compiler/2021.4.0/linux/compiler/lib/intel64_lin' '-DCMAKE_CXX_FLAGS=-Rpass=loop-vectorize -Rpass-missed=loop-vectorize -Rpass-analysis=loop-vectorize -fsave-optimization-record -O3 -march=skylake-avx512 -mtune=skylake -ffast-math -fopenmp-simd -fveclib=SVML'
make -j8

Test System

BB5

pramodk avatar Jun 22 '22 08:06 pramodk