Skip to content
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

[swig_installer] unknown option with cmake #1031

Closed
rea-yseop opened this issue Nov 12, 2019 · 5 comments · Fixed by conan-io/conan-center-index#1717
Closed

[swig_installer] unknown option with cmake #1031

rea-yseop opened this issue Nov 12, 2019 · 5 comments · Fixed by conan-io/conan-center-index#1717
Labels

Comments

@rea-yseop
Copy link

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: swig_installer/4.0.1
  • Operating System+version: Linux Debian 10
  • Compiler+version: gcc-8
  • Conan version: conan 1.19.1
  • Python version: Python 3.7.3

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

# Set up swig
find_package(swig_installer REQUIRED)

# Set policies to new to avoid warning.
# Should be removed in later version of cmake.
if (POLICY CMP0078)
cmake_policy(SET CMP0078 NEW)
endif()

if (POLICY CMP0086)
    cmake_policy(SET CMP0086 NEW)
endif()

# Enable methods from cmake swig.
include(UseSWIG)

# Include python
find_package(Python3 REQUIRED)
include_directories(${Python3_INCLUDE_DIRS})

swig_add_library(my_module
    TYPE MODULE
    LANGUAGE python
    SOURCES my_module.i)

Logs (Include/Attach if Applicable)

cmake -E env: unknown option '-python'

I am trying to use swig_installer with CMake.
Not sure if it is related to #1026.

@rea-yseop rea-yseop added the bug label Nov 12, 2019
@Croydon
Copy link
Member

Croydon commented Mar 12, 2020

@madebr could you maybe have a look? 😄

@madebr
Copy link
Contributor

madebr commented Mar 12, 2020

@rea-yseop
UseSWIG only works with cmake's FindSWIG module.

So you still need find_package(SWIG REQUIRED).

@rea-yseop
Copy link
Author

Sorry completely forgot to update this issue.
Thanks for the answer. I also had issue by using only find_package(SWIG REQUIRED) and had to be more specific by using find_package(SWIG 4 REQUIRED).

@madebr
Copy link
Contributor

madebr commented May 23, 2020

@rea-yseop
This recipe will soon be available on CCI (conan-io/conan-center-index#1717)

@rea-yseop
Copy link
Author

This works for me. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants