Skip to content

Commit 6c39840

Browse files
authored
Merge pull request ERGO-Code#2259 from ERGO-Code/mpopcnt
Do not add mpopcnt to nvcc
2 parents 7909d15 + 8366a75 commit 6c39840

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,13 @@ if (NOT HIGHS_COVERAGE AND NOT APPLE)
400400
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64|powerpc64)")
401401
check_cxx_compiler_flag("-mpopcntd" COMPILER_SUPPORTS_POPCNTD)
402402
if(COMPILER_SUPPORTS_POPCNTD)
403-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcntd")
403+
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcntd")
404+
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mpopcntd>")
404405
endif()
405406
else()
406407
check_cxx_compiler_flag("-mpopcnt" COMPILER_SUPPORTS_POPCNT)
407408
if(COMPILER_SUPPORTS_POPCNT)
408-
add_compile_options(-mpopcnt)
409+
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-mpopcnt>")
409410
endif()
410411
endif()
411412
endif()

0 commit comments

Comments
 (0)