Skip to content

Commit 1a92ce3

Browse files
authored
Merge pull request #305 from nouiz/conda
Conda
2 parents 757f96d + 9226f57 commit 1a92ce3

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ PROJECT(libgpuarray C)
44

55
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
66

7-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
7+
# -Wall is unbelieveably noisy with Visual Studio:
8+
# http://stackoverflow.com/q/4001736/3257826
9+
if(MSVC)
10+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W4")
11+
else()
12+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
13+
endif()
814

915
enable_testing()
1016

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ def __init__(self, *args, **kwargs):
7676

7777
include_dirs = [np.get_include()]
7878
library_dirs = []
79-
if sys.platform == 'win32':
79+
if sys.platform == 'win32' and not os.getenv('CONDA_BUILD'):
8080
# This is a hack so users don't need to do many steps for windows install
8181
# Just use the default location.
8282
current_dir = os.path.abspath(os.path.dirname(__file__))
8383
include_dirs += [os.path.join(current_dir, 'src')]
8484

8585
default_bin_dir = os.path.join(current_dir, 'lib', 'Release')
8686
if not os.path.isdir(default_bin_dir):
87-
raise RuntimeError('default binary dir {} does not exist, you may need to build the C library in release mode')
87+
raise RuntimeError('default binary dir {} does not exist, you may need to build the C library in release mode'.format(default_bin_dir))
8888
library_dirs += [default_bin_dir]
8989

9090
with open('pygpu/version.py', 'w') as f:

src/util/integerfactoring.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* Includes */
22
#include <stdio.h>
33
#include <stdlib.h>
4+
#include <gpuarray/config.h>
45
#include <string.h>
56
#include "integerfactoring.h"
67

0 commit comments

Comments
 (0)