cmake-basis / BASIS

CMake BASIS makes it easy to create sharable software and libraries that work together. This is accomplished by combining and documenting some of the best practices and utilities available. This project supplies a fully integrated suite of functionality to make the whole process seamless!
https://cmake-basis.github.io
Other
48 stars 10 forks source link

(almost) empty generated basisproject executable #598

Closed wittenbe closed 8 years ago

wittenbe commented 8 years ago

I tried following the instructions from the quick start, but I'm having no luck. Turns out that after make, the generated basisproject executable is an almost empty python script:

#! /usr/bin/python

# ============================================================================
# Copyright (c) 2011-2012 University of Pennsylvania
# Copyright (c) 2013-2016 Andreas Schuh
# All rights reserved.
#
# See COPYING file for license information or visit
# https://cmake-basis.github.io/download.html#license
# ============================================================================

##############################################################################
# @file  basisproject.py
# @brief Project tool used to create and/or modify a BASIS project.
#
# @ingroup Tools
##############################################################################

# ============================================================================
# modules
# ============================================================================

from __future__ import unicode_literals
import sys; import os.path; __dir__ = os.path.dirname(os.path.realpath(__file__)); sys.path.insert(0, os.path.realpath('/home/forte/local/src/BASIS/build/lib/python')); sys.path.insert(0, os.path.realpath('/home/forte/local/src/BASIS/build/lib')) # <-- added by BASIS

Let me know if/what additional info you need.

wittenbe commented 8 years ago

I only just realized that there's an actual release archive file. That one's generating a proper basisproject executable.

schuhschuh commented 8 years ago

Hi, this is a bug I've just recently introduced after the last release. It's been fixed in a downstream project and the fix just needs to be pushed upstream. You could use either the release version, or the master branch before the linked commit.

The mistake in the previous commit is that the following line was not adjusted to account for the modified regular expression:

set (SCRIPT            "${CMAKE_MATCH_3}")

must be changed to

set (SCRIPT            "${CMAKE_MATCH_2}")