Skip to content

Commit

Permalink
Refactor RE2 inclusion
Browse files Browse the repository at this point in the history
Just a couple of cosmetic changes to setting up RE2 build.
Let is more intended to modern cmake flavour.
  • Loading branch information
klirichek committed Mar 26, 2019
1 parent 49abf80 commit 491bc9d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions libre2/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required ( VERSION 2.8 )

PROJECT ( RE2 )
PROJECT ( RE2 CXX C )
#Parses Makefile and creates the own project based on it
#(actually we only use OFILES var from there)

Expand Down Expand Up @@ -51,13 +51,12 @@ else ( _OBJ )
endif ( _OBJ )


include_directories ( "." )
IF ( CMAKE_COMPILER_IS_GNUCXX )
SET ( CMAKE_CXX_FLAGS "-Wall -O3 -g -pthread -Wsign-compare -c " )
ELSEIF ( MSVC )
set ( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi /GL" )
add_definitions ( "/D NOMINMAX" )
ENDIF ()
add_definitions ( "-DNDEBUG" )
add_library ( RE2 STATIC ${SOURCES} ${_HF} ${_IHF} )

target_include_directories( RE2 PRIVATE . )
add_definitions ( "-DNDEBUG" )
if ( CMAKE_CXX_COMPILER_ID MATCHES MSVC )
target_compile_options ( RE2 PRIVATE /Oi /GL )
add_definitions ( "-DNOMINMAX" )
else()
target_compile_options ( RE2 PRIVATE -Wall -O3 -g -pthread -Wsign-compare -c )
endif()

0 comments on commit 491bc9d

Please sign in to comment.