Added detection of Windows 10 / Cygwin64 (N. Shimizu).
This commit is contained in:
parent
2c6bee30ad
commit
0930660a1f
|
@ -146,6 +146,8 @@ class Configuration ( object ):
|
||||||
self._osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
self._osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
||||||
self._osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
self._osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
||||||
self._osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
self._osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
||||||
|
self._osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
|
||||||
|
self._osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
|
||||||
|
|
||||||
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
||||||
lines = uname.stdout.readlines()
|
lines = uname.stdout.readlines()
|
||||||
|
@ -186,6 +188,10 @@ class Configuration ( object ):
|
||||||
self._osType = "Cygwin.W8_64"
|
self._osType = "Cygwin.W8_64"
|
||||||
self._libSuffix = "64"
|
self._libSuffix = "64"
|
||||||
elif self._osCygwinW8.match(lines[0]): self._osType = "Cygwin.W8"
|
elif self._osCygwinW8.match(lines[0]): self._osType = "Cygwin.W8"
|
||||||
|
elif self._osCygwinW10_64.match(lines[0]):
|
||||||
|
self._osType = "Cygwin.W10_64"
|
||||||
|
self._libSuffix = "64"
|
||||||
|
elif self._osCygwinW10.match(lines[0]): self._osType = "Cygwin.W10"
|
||||||
else:
|
else:
|
||||||
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
||||||
self._osType = uname.stdout.readlines()[0][:-1]
|
self._osType = uname.stdout.readlines()[0][:-1]
|
||||||
|
|
|
@ -80,6 +80,8 @@ def guessOs ():
|
||||||
osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
||||||
osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
||||||
osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
||||||
|
osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
|
||||||
|
osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
|
||||||
|
|
||||||
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
||||||
lines = uname.stdout.readlines()
|
lines = uname.stdout.readlines()
|
||||||
|
@ -127,6 +129,11 @@ def guessOs ():
|
||||||
libDir = "lib64"
|
libDir = "lib64"
|
||||||
elif osCygwinW8.match(lines[0]):
|
elif osCygwinW8.match(lines[0]):
|
||||||
osType = "Cygwin.W8"
|
osType = "Cygwin.W8"
|
||||||
|
elif osCygwinW10_64.match(lines[0]):
|
||||||
|
osType = "Cygwin.W10_64"
|
||||||
|
libDir = "lib64"
|
||||||
|
elif osCygwinW10.match(lines[0]):
|
||||||
|
osType = "Cygwin.W10"
|
||||||
else:
|
else:
|
||||||
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
||||||
osType = uname.stdout.readlines()[0][:-1]
|
osType = uname.stdout.readlines()[0][:-1]
|
||||||
|
|
|
@ -78,14 +78,16 @@
|
||||||
#set(DEBUG_FLAGS "-g -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
|
#set(DEBUG_FLAGS "-g -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
|
||||||
set(DEBUG_FLAGS "-g")
|
set(DEBUG_FLAGS "-g")
|
||||||
if(CYGWIN)
|
if(CYGWIN)
|
||||||
set(CXX_STANDARD "gnu++0x")
|
set(ADDTIONAL_FLAGS "-D_GLIBCXX_USE_C99")
|
||||||
|
set(CXX_STANDARD "gnu++11")
|
||||||
else()
|
else()
|
||||||
|
set(ADDTIONAL_FLAGS "")
|
||||||
set(CXX_STANDARD "c++11")
|
set(CXX_STANDARD "c++11")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_C_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
|
set(CMAKE_C_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
|
||||||
set(CMAKE_C_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE)
|
set(CMAKE_C_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE)
|
set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE)
|
set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -52,6 +52,8 @@ def guessOs ():
|
||||||
osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
||||||
osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
||||||
osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
||||||
|
osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
|
||||||
|
osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
|
||||||
|
|
||||||
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
||||||
lines = uname.stdout.readlines()
|
lines = uname.stdout.readlines()
|
||||||
|
@ -108,6 +110,11 @@ def guessOs ():
|
||||||
libDir = "lib64"
|
libDir = "lib64"
|
||||||
elif osCygwinW8.match(lines[0]):
|
elif osCygwinW8.match(lines[0]):
|
||||||
osType = "Cygwin.W8"
|
osType = "Cygwin.W8"
|
||||||
|
elif osCygwinW10_64.match(lines[0]):
|
||||||
|
osType = "Cygwin.W10_64"
|
||||||
|
libDir = "lib64"
|
||||||
|
elif osCygwinW10.match(lines[0]):
|
||||||
|
osType = "Cygwin.W10"
|
||||||
else:
|
else:
|
||||||
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
||||||
osType = uname.stdout.readlines()[0][:-1]
|
osType = uname.stdout.readlines()[0][:-1]
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
Loading…
Reference in New Issue