-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
106 changed files
with
23,069 additions
and
52,038 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
# Reset the warning level for third parties | ||
function(vor_reset_warning_level) | ||
endfunction() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#------------------------------------------------------------------- | ||
# Flags for compiling with Mingw | ||
#------------------------------------------------------------------- | ||
|
||
# Shell script extension | ||
set(SHELL_SUFFIX "sh") | ||
|
||
# Define the environment for cross compiling to Windows | ||
SET(CMAKE_SYSTEM_NAME Windows) # Target system name | ||
SET(CMAKE_SYSTEM_VERSION 1) | ||
|
||
SET(CMAKE_AR "x86_64-w64-mingw32-ar") | ||
SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") | ||
SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") | ||
|
||
# Configure the behaviour of the find commands | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
|
||
set(VORPALINE_ARCH_64 true) | ||
|
||
# Link with the loader library | ||
list(APPEND SYSLIBS dl) | ||
|
||
# No graphics (yet) for Android | ||
set(GEOGRAM_WITH_GRAPHICS FALSE) | ||
|
||
# Warning flags | ||
set(NORMAL_WARNINGS -Wall -Wextra) | ||
set(FULL_WARNINGS | ||
${NORMAL_WARNINGS} | ||
-pedantic | ||
-Wno-long-long | ||
# Detect conversion problems (lot of warnings) | ||
-Wconversion | ||
-Wsign-conversion | ||
-Wdouble-promotion | ||
) | ||
|
||
# Compile with full warnings by default | ||
add_definitions(${FULL_WARNINGS}) | ||
|
||
# Warn about missing virtual destructor (C++ only) | ||
add_flags(CMAKE_CXX_FLAGS -Wnon-virtual-dtor) | ||
|
||
# define the windows version | ||
add_flags(CMAKE_CXX_FLAGS -D_WIN32_WINNT=0x601 -DMINGW_HAS_SECURE_API -Wno-unknown-pragmas) | ||
# Activate c++ 2011 | ||
add_flags(CMAKE_CXX_FLAGS -std=c++11) | ||
|
||
# Additional debug flags | ||
# deactivated for now: I added bound checking in VOR::vector<>. | ||
#add_flags(CMAKE_CXX_FLAGS_DEBUG -D_GLIBCXX_DEBUG) | ||
|
||
# Compile and link with pthreads | ||
add_flags(CMAKE_CXX_FLAGS -pthread) | ||
add_flags(CMAKE_C_FLAGS -pthread) | ||
|
||
# Reset the warning level for third parties | ||
function(vor_reset_warning_level) | ||
remove_definitions(${FULL_WARNINGS}) | ||
add_definitions(${NORMAL_WARNINGS}) | ||
endfunction() | ||
|
||
if ( APPLE ) | ||
string ( REPLACE "-Wl,-search_paths_first" "" CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS} ) | ||
string ( REPLACE "-Wl,-search_paths_first" "" CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ) | ||
endif () | ||
|
||
macro(vor_add_executable) | ||
|
||
if(NOT VORPALINE_BUILD_DYNAMIC) | ||
# Create a statically linked executable | ||
# Link with static libraries | ||
# ... does not work with NDK 10.d | ||
# (causes errors / multiply linked symbols) | ||
# add_flags(CMAKE_CXX_FLAGS -static-libstdc++ -static-libgcc -static) | ||
# add_flags(CMAKE_C_FLAGS -static-libgcc -static) | ||
endif() | ||
|
||
add_executable(${ARGN}) | ||
endmacro() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
set(VORPALINE_WITH_GRAPHICS FALSE) | ||
|
||
include(${GEOGRAM_SOURCE_DIR}/cmake/platforms/MinGW-x86_64-w64.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export AR=x86_64-w64-mingw32-ar | ||
export CC=x86_64-w64-mingw32-gcc | ||
export CXX=x86_64-w64-mingw32-g++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
set(VORPALINE_ARCH_64 true) | ||
include(${GEOGRAM_SOURCE_DIR}/cmake/platforms/Windows-vs.cmake) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:: Get the Visual Studio installation dir | ||
set MSVCDIR=%VS140COMNTOOLS%..\..\VC | ||
|
||
:: Configure environment for Visual Studio | ||
call "%MSVCDIR%\VCVARSALL.BAT" x64 | ||
|
||
:: Set the generator to use | ||
set CMAKE_VS_GENERATOR=Visual Studio 14 2015 Win64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.