Skip to content

Commit

Permalink
Merge pull request #700 from amitdo/cmake-rm-cxx
Browse files Browse the repository at this point in the history
CMakeLists.txt: Remove remainng 'cxx'
  • Loading branch information
zdenop authored Jun 16, 2023
2 parents 140d581 + ec75578 commit 62222a4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ set(libs_private "${libs_private} -lm")
#
# ##############################################################################

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CLANG 1)
endif()

Expand All @@ -247,20 +247,18 @@ else()
endif()

include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)

# Check for valid compiler flags
macro(CHECK_CCXX_COMPILER_FLAG flag_ result_)
check_c_compiler_flag(${flag_} C_HAS${result_})
check_cxx_compiler_flag(${flag_} CXX_HAS${result_})
endmacro()

if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_compile_options("$<$<CONFIG:Release>:/W1;/Ox>")
add_compile_options("$<$<CONFIG:Debug>:/W4;/DDEBUG>")
if(NOT CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
endif()
else()
if(CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]")
Expand All @@ -279,9 +277,6 @@ else()
if(C_HAS${flag_var})
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${flag_}")
endif()
if(CXX_HAS${flag_var})
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${flag_}")
endif()
endforeach()
add_definitions(-DDEBUG)
endif()
Expand Down

0 comments on commit 62222a4

Please sign in to comment.