Skip to content

Commit

Permalink
Make 64 bit target detection automatic on windows. pmoulon#5
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Aug 22, 2014
1 parent f03f4dd commit 6c313cd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions program/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# First draft the 4 june 2010
# Second draft 24 sept 2010
# Third draft (linux) 12 oct 2010
# 28 july 2014 Make VisualStudio Win32/Win64 detection automatic

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

Expand Down Expand Up @@ -30,11 +31,14 @@ INCLUDE_DIRECTORIES(
${ADDITIONAL_WIN_INCLUDES}
)

#if you build on win64 you have to set to true the following variable
SET(WIN64_PTHREAD false)

IF(WIN32)

IF (${CMAKE_CL_64})
SET(WIN64_PTHREAD true)
ELSE (${CMAKE_CL_64})
SET(WIN64_PTHREAD false)
ENDIF (${CMAKE_CL_64})

IF(WIN64_PTHREAD)
SET(PTHREAD_LIB ${CMAKE_SOURCE_DIR}/thirdParty/pthreadVC2.lib)
ELSE(WIN64_PTHREAD)
Expand Down

0 comments on commit 6c313cd

Please sign in to comment.