Skip to content

Commit

Permalink
Disable C interface on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryAWE committed Jan 9, 2024
1 parent eae8780 commit ec24bf4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

option(papilio_c_interface "build C interface" ON)
option(papilio_c_interface "build C interface" $<$<C_COMPILER_ID:MSVC>:OFF:ON>)
option(papilio_build_unit_test "build unit tests" OFF)
option(papilio_build_example "build examples" OFF)
option(papilio_build_module "build module (experimental)" OFF)
Expand Down Expand Up @@ -50,6 +50,9 @@ target_compile_options(papilio PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W4>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic>
)
if(${papilio_c_interface})
target_compile_options(papilio PRIVATE $<$<C_COMPILER_ID:MSVC>:/Zc:preprocessor>)
endif()

if(${papilio_build_example})
add_subdirectory(example)
Expand Down

0 comments on commit ec24bf4

Please sign in to comment.