aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2019-09-07 12:52:37 -0400
committerDavid Neto <dneto@google.com>2019-09-07 12:52:37 -0400
commit291037172dcb79318a7d0214a194e985c9ad0d7b (patch)
treed58a7039f474073fcf1bbe32a958c55252f723c5 /cmake
parentb93cb2bdda93ed98f253b75a59582780c8460cc1 (diff)
parent6527fb25482ee16f0ae8c735d1d0c33f7d5f220a (diff)
downloadeffcee-master.tar.gz
Includes: 6527fb2 Fail parsing checks if var def regexp is bad 0eb6499 Fail parsing checks if the regexp is bad. ecbc165 Add effcee-fuzz 3842fdc Add Bazel build rules. 4bef5db Require Python 3 8bf4e0a Add Clang warning -Wextra-semi Change-Id: If24758e51cfcc12826dd97550429502441d769e9 Testing: checkbuild.py on Linux
Diffstat (limited to 'cmake')
-rw-r--r--cmake/setup_build.cmake24
-rw-r--r--cmake/utils.cmake3
2 files changed, 4 insertions, 23 deletions
diff --git a/cmake/setup_build.cmake b/cmake/setup_build.cmake
index 40749fc..9867de9 100644
--- a/cmake/setup_build.cmake
+++ b/cmake/setup_build.cmake
@@ -12,35 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# For cross-compilation, we need to use find_host_package
-# in the remaining setup. But if not cross-compiling, then we
-# need to alias find_host_package to find_package.
-# Similar for find_host_program.
if(NOT COMMAND find_host_package)
macro(find_host_package)
find_package(${ARGN})
endmacro()
endif()
-if(NOT COMMAND find_host_program)
- macro(find_host_program)
- find_program(${ARGN})
- endmacro()
-endif()
-
-if (ANDROID)
- # For android let's preemptively find the correct packages so that
- # child projects (e.g. googletest) do not fail to find them.
- find_host_package(PythonInterp)
-endif()
-foreach(PROGRAM echo python)
- string(TOUPPER ${PROGRAM} PROG_UC)
- if (ANDROID)
- find_host_program(${PROG_UC}_EXE ${PROGRAM} REQUIRED)
- else()
- find_program(${PROG_UC}_EXE ${PROGRAM} REQUIRED)
- endif()
-endforeach(PROGRAM)
+find_host_package(PythonInterp 3 REQUIRED)
option(DISABLE_RTTI "Disable RTTI in builds")
if(DISABLE_RTTI)
diff --git a/cmake/utils.cmake b/cmake/utils.cmake
index 291be3c..19e81f2 100644
--- a/cmake/utils.cmake
+++ b/cmake/utils.cmake
@@ -37,6 +37,9 @@ function(effcee_default_c_compile_options TARGET)
if (UNIX AND NOT MINGW)
target_link_libraries(${TARGET} PUBLIC -pthread)
endif()
+ if (${CMAKE_C_COMPILER_ID} MATCHES "Clang")
+ target_compile_options(${TARGET} PRIVATE -Wextra-semi)
+ endif()
else()
# disable warning C4800: 'int' : forcing value to bool 'true' or 'false'
# (performance warning)