Skip to content

Commit

Permalink
Merge pull request #124 from comex/mac-fixes
Browse files Browse the repository at this point in the history
CMakeLists changes to fix macOS build:
  • Loading branch information
marxin authored Jan 30, 2024
2 parents 916e1c5 + d52a0b7 commit 2f46bdc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ check_cxx_compiler_flag(
)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# XXX figure out how to get "-std=c++17 -fno-rtti" from LLVM. That's how we
# get those options in the Automake path...
set(COMMON_FLAGS "-Wall -Wextra -Werror -pedantic -Wno-unused-parameter")
Expand Down
6 changes: 3 additions & 3 deletions clex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ add_executable(strlex
)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set_source_files_properties(clex.c PROPERTIES COMPILE_FLAGS -Wno-unused-function)
set_source_files_properties(strlex.c PROPERTIES COMPILE_FLAGS -Wno-unused-function)
OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_source_files_properties(clex.c PROPERTIES COMPILE_FLAGS "-Wno-unused-function -Wno-sign-compare")
set_source_files_properties(strlex.c PROPERTIES COMPILE_FLAGS "-Wno-unused-function -Wno-sign-compare")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set_source_files_properties(clex.c PROPERTIES COMPILE_FLAGS -DYY_NO_UNISTD_H)
Expand Down
4 changes: 2 additions & 2 deletions delta/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ add_executable(topformflat
)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set_source_files_properties(topformflat.c PROPERTIES COMPILE_FLAGS "-Wno-unused-function -Wno-unused-parameter")
OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_source_files_properties(topformflat.c PROPERTIES COMPILE_FLAGS "-Wno-unused-function -Wno-unused-parameter -Wno-sign-compare")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set_source_files_properties(topformflat.c PROPERTIES COMPILE_FLAGS -DYY_NO_UNISTD_H)
Expand Down

0 comments on commit 2f46bdc

Please sign in to comment.