-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try win #48
Try win #48
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This file was automatically generated by conda-smithy. To update a component of this | ||
# file, make changes to conda-forge.yml and/or recipe/meta.yaml, and run | ||
# "conda smithy rerender". | ||
|
||
environment: | ||
|
||
BINSTAR_TOKEN: | ||
# The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. | ||
secure: ipv/06DzgA7pzz2CIAtbPxZSsphDtF+JFyoWRnXkn3O8j7oRe3rzqj3LOoq2DZp4 | ||
|
||
matrix: | ||
- TARGET_ARCH: x64 | ||
CONDA_PY: 36 | ||
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 | ||
|
||
|
||
# We always use a 64-bit machine, but can build x86 distributions | ||
# with the TARGET_ARCH variable. | ||
platform: | ||
- x64 | ||
|
||
install: | ||
# If there is a newer build queued for the same PR, cancel this one. | ||
- cmd: | | ||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/conda-forge/conda-forge-build-setup-feedstock/master/recipe/ff_ci_pr_build.py', 'ff_ci_pr_build.py')" | ||
ff_ci_pr_build -v --ci "appveyor" "%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%" "%APPVEYOR_BUILD_NUMBER%" "%APPVEYOR_PULL_REQUEST_NUMBER%" | ||
del ff_ci_pr_build.py | ||
|
||
# Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) | ||
- cmd: rmdir C:\cygwin /s /q | ||
|
||
# Add path, activate `conda` and update conda. | ||
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat | ||
- cmd: conda update --yes --quiet conda | ||
|
||
- cmd: set PYTHONUNBUFFERED=1 | ||
|
||
# Add our channels. | ||
- cmd: conda config --set show_channel_urls true | ||
- cmd: conda config --remove channels defaults | ||
- cmd: conda config --add channels defaults | ||
- cmd: conda config --add channels conda-forge | ||
|
||
# Configure the VM. | ||
- cmd: conda install -n root --quiet --yes conda-forge-build-setup | ||
- cmd: run_conda_forge_build_setup | ||
|
||
# Skip .NET project specific build phase. | ||
build: off | ||
|
||
test_script: | ||
- conda build recipe --quiet | ||
deploy_script: | ||
- cmd: upload_or_check_non_existence .\recipe conda-forge --channel=main |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
mkdir %SRC_DIR%\build | ||
cd %SRC_DIR%\build | ||
|
||
set "CFLAGS=%CFLAGS% -DWIN32 -DGSL_DLL" | ||
set "CXXFLAGS=%CXXFLAGS% -DWIN32 -DGSL_DLL" | ||
|
||
cmake -G "NMake Makefiles" ^ | ||
-D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ | ||
-D CMAKE_BUILD_TYPE=Release ^ | ||
-D NCO_MSVC_USE_MT=no ^ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you change this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest I don't know. I'll try this first and, if does not work, I'll change |
||
-D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ | ||
-D NETCDF_INCLUDE=%LIBRARY_INC% ^ | ||
-D NETCDF_LIBRARY=%LIBRARY_LIB%\netcdf.lib ^ | ||
-D HDF5_LIBRARY=%LIBRARY_LIB%\libhdf5.lib ^ | ||
-D HDF5_HL_LIBRARY=%LIBRARY_LIB%\libhdf5_hl.lib ^ | ||
-D GSL_INCLUDE=%LIBRARY_INC% ^ | ||
-D GSL_LIBRARY=%LIBRARY_LIB%\gsl.lib ^ | ||
-D GSL_CBLAS_LIBRARY=%LIBRARY_LIB%\gslcblas.lib ^ | ||
-D UDUNITS2_INCLUDE=%LIBRARY_LIB% ^ | ||
-D UDUNITS2_LIBRARY=%LIBRARY_LIB%\udunits2.lib ^ | ||
-D EXPAT_LIBRARY=%LIBRARY_LIB%\expat.lib ^ | ||
-D CURL_LIBRARY=%LIBRARY_LIB%\libcurl.lib ^ | ||
-D ANTLR_INCLUDE:PATH=%LIBRARY_INC%\antlr ^ | ||
%SRC_DIR% | ||
if errorlevel 1 exit 1 | ||
|
||
|
||
nmake | ||
if errorlevel 1 exit 1 | ||
|
||
nmake install | ||
if errorlevel 1 exit 1 | ||
|
||
move %LIBRARY_PREFIX%\*.exe %LIBRARY_BIN% || exit 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- nco.orig/CMakeLists.txt 2017-12-14 11:45:35.682879719 -0200 | ||
+++ nco/CMakeLists.txt 2017-12-14 12:13:11.007075309 -0200 | ||
@@ -52,10 +52,12 @@ | ||
#general C/C++ build flags | ||
#///////////////////////////////////////////////////////////////////////////////////// | ||
|
||
-set(CMAKE_BUILD_TYPE Debug) | ||
-set(BUILD_STATIC_LIBS ON) | ||
-set(BUILD_SHARED_LIBS OFF) | ||
-add_definitions(-DENABLE_STATIC) | ||
+set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build.") | ||
+set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libs.") | ||
+ | ||
+if (NOT BUILD_SHARED_LIBS) | ||
+ add_definitions(-DENABLE_STATIC) | ||
+endif() | ||
|
||
#////////////////////////// | ||
#detect minimum dependencies using | ||
@@ -247,22 +249,27 @@ | ||
#compile as C++/static CRT on Visual Studio and as C99 on UNIX | ||
#////////////////////////// | ||
|
||
+set(NCO_MSVC_USE_MT yes CACHE BOOL "Use MT flags when compiling in MSVC") | ||
+ | ||
if (MSVC) | ||
add_definitions( "/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE" ) | ||
- message("-- Building with static runtime library") | ||
- set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1") | ||
- set(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG") | ||
- set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG") | ||
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG") | ||
- | ||
+ | ||
+ if (NCO_MSVC_USE_MT) | ||
+ foreach(CompilerFlag CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE | ||
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO | ||
+ CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE | ||
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) | ||
+ string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") | ||
+ endforeach() | ||
+ endif() | ||
+ | ||
#////////////////////////// | ||
#compile as C++ Code (/TP) | ||
#////////////////////////// | ||
- | ||
- set(CMAKE_C_FLAGS_DEBUG "/TP /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1") | ||
- set(CMAKE_C_FLAGS_MINSIZEREL "/TP /MT /O1 /Ob1 /D NDEBUG") | ||
- set(CMAKE_C_FLAGS_RELEASE "/TP /MT /O2 /Ob2 /D NDEBUG") | ||
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "/TP /MT /Zi /O2 /Ob1 /D NDEBUG") | ||
+ foreach(CompilerFlag CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE | ||
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) | ||
+ set(${CompilerFlag} "/TP ${${CompilerFlag}}") | ||
+ endforeach() | ||
|
||
#////////////////////////// | ||
#visual studio defines math symbols in math.h, avoid duplicate definition | ||
@@ -402,7 +409,8 @@ | ||
set(nco_SOURCES ${nco_SOURCES} src/nco/nco_var_scv.c src/nco/nco_var_scv.h) | ||
set(nco_SOURCES ${nco_SOURCES} src/nco/nco_var_utl.c src/nco/nco_var_utl.h) | ||
|
||
-add_library(nco STATIC ${nco_SOURCES}) | ||
+# Type of library (SHARED, STATIC) is configured using BUILD_SHARED_LIBS | ||
+add_library(nco ${nco_SOURCES}) | ||
add_executable(ncks src/nco/ncks.c) | ||
add_executable(ncbo src/nco/ncbo.c) | ||
add_executable(ncecat src/nco/ncecat.c) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,43 +5,55 @@ package: | |
version: {{ version }} | ||
|
||
source: | ||
url: https://github.com/nco/nco/archive/{{ version }}.tar.gz | ||
sha256: 5ba930f00a0e9775f85748d145acecfe142f917c180de538b2f8994788446cf8 | ||
# url: https://github.com/nco/nco/archive/{{ version }}.tar.gz | ||
# sha256: 5ba930f00a0e9775f85748d145acecfe142f917c180de538b2f8994788446cf8 | ||
# Just testing before we have a new release. | ||
git_url: https://github.com/nco/nco.git | ||
git_branch: master | ||
|
||
build: | ||
number: 4 | ||
skip: True # [win] | ||
skip: True # [win32 or (win and py<=35)] | ||
features: | ||
- vc14 # [win and (py35 or py36)] | ||
|
||
requirements: | ||
build: | ||
- gsl >=2.2,<2.3 | ||
- python # [win] | ||
- cmake # [win] | ||
- antlr >=2.7.7,<3 | ||
- bison # [not win] | ||
- texinfo # [not win] | ||
- flex # [not win] | ||
- m4 # [not win] | ||
- curl >=7.44.0,<8 | ||
- zlib 1.2.11 | ||
- expat 2.2.* | ||
- gsl >=2.2,<2.3 | ||
- hdf5 1.10.1 | ||
- krb5 1.14.* # [not win] | ||
- libnetcdf 4.4.* | ||
- udunits2 | ||
- expat 2.2.* | ||
- krb5 1.14.* | ||
- texinfo | ||
- bison | ||
- flex | ||
- m4 | ||
- zlib 1.2.11 | ||
- vc 14 # [win and (py35 or py36)] | ||
run: | ||
- curl >=7.44.0,<8 | ||
- expat 2.2.* | ||
- gsl >=2.2,<2.3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
- hdf5 1.10.1 | ||
- krb5 1.14.* # [not win] | ||
- libnetcdf 4.4.* | ||
- udunits2 | ||
- expat 2.2.* | ||
- libgcc | ||
- esmf | ||
- openblas 0.2.20|0.2.20* | ||
- libgcc # [not win] | ||
- openblas 0.2.20|0.2.20* # [not win] | ||
- esmf # [not win] | ||
- vc 14 # [win and (py35 or py36)] | ||
|
||
test: | ||
source_files: | ||
- data/in.nc | ||
- data/in.cdl | ||
commands: | ||
- ncks --help | ||
- ncks -M "http://tds.marine.rutgers.edu/thredds/dodsC/roms/espresso/2013_da/his/ESPRESSO_Real-Time_v2_History_Best" | ||
- ncap2 --help | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @czender a simple |
||
- conda inspect linkages -p $PREFIX $PKG_NAME # [not win] | ||
- conda inspect objects -p $PREFIX $PKG_NAME # [osx] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cd data | ||
|
||
ncgen -o in.nc in.cdl | ||
|
||
ncks -H --trd -v one in.nc | ||
if errorlevel 1 exit 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- nco.orig/src/nco/nco_sng_utl.h 2017-12-14 11:45:35.782871098 -0200 | ||
+++ nco/src/nco/nco_sng_utl.h 2017-12-14 13:06:20.619851116 -0200 | ||
@@ -26,7 +26,8 @@ | ||
|
||
#ifdef _MSC_VER | ||
# define NEED_STRSEP | ||
-# define NEED_STRCASECMP | ||
+//# define NEED_STRCASECMP (netcdf defines strcasecmp for MSVC) | ||
+# define strncasecmp _strnicmp // (but not strncasecmp) | ||
# define NEED_STRCASESTR | ||
#endif /* !_MSC_VER */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@czender GSL error was fixed with this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. The linking issue was fixed by @isuruf.
Also, I just added the extra test in my latest commit. See 391c080