Skip to content

Commit

Permalink
target_compile_definitions() needs a scope keyword.
Browse files Browse the repository at this point in the history
Fixes #429.

Change-Id: I58ca8ecea8854dd899f711938c49fe75bfff640d
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61393
Reviewed-by: Perry Lorier <[email protected]>
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Jun 1, 2023
1 parent 0f3bf78 commit 7c5e396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ if(RE2_BUILD_TESTING)

add_library(testing ${TESTING_SOURCES})
if(BUILD_SHARED_LIBS AND WIN32)
target_compile_definitions(testing -DRE2_BUILD_TESTING_DLL)
target_compile_definitions(testing PRIVATE -DRE2_BUILD_TESTING_DLL)
endif()
target_compile_features(testing PUBLIC cxx_std_14)
target_link_libraries(testing PUBLIC re2 GTest::gtest)
Expand Down Expand Up @@ -220,7 +220,7 @@ if(RE2_BUILD_TESTING)
foreach(target ${TEST_TARGETS})
add_executable(${target} re2/testing/${target}.cc)
if(BUILD_SHARED_LIBS AND WIN32)
target_compile_definitions(${target} -DRE2_CONSUME_TESTING_DLL)
target_compile_definitions(${target} PRIVATE -DRE2_CONSUME_TESTING_DLL)
endif()
target_compile_features(${target} PUBLIC cxx_std_14)
target_link_libraries(${target} PUBLIC testing GTest::gtest_main ${EXTRA_TARGET_LINK_LIBRARIES})
Expand All @@ -230,7 +230,7 @@ if(RE2_BUILD_TESTING)
foreach(target ${BENCHMARK_TARGETS})
add_executable(${target} re2/testing/${target}.cc)
if(BUILD_SHARED_LIBS AND WIN32)
target_compile_definitions(${target} -DRE2_CONSUME_TESTING_DLL)
target_compile_definitions(${target} PRIVATE -DRE2_CONSUME_TESTING_DLL)
endif()
target_compile_features(${target} PUBLIC cxx_std_14)
target_link_libraries(${target} PUBLIC testing benchmark::benchmark_main ${EXTRA_TARGET_LINK_LIBRARIES})
Expand Down

0 comments on commit 7c5e396

Please sign in to comment.